package com.cambright.lotusroot
{
	import flash.events.Event;
	import flash.events.IEventDispatcher;
	
	public class Notice extends Event
	{
		static private const _PREFIX:String = "lotusroot_";
		static private var _NEWABLE:Boolean = false;
		
		static private function _DISPATCH(dispatcher:IEventDispatcher, type:String):void
		{
			_NEWABLE = true;
			var event:Notice = new Notice(_PREFIX + type);
			_NEWABLE = false;
			dispatcher.dispatchEvent(event);
		}
		
		public function Notice(type:String)
		{
			super(type, false, false);
		}
		
		
		static internal const $INTERNAL_TYPE_COMMAND_NOTIFY:String = "internal_" + _PREFIX + "command_notify";
		static public function $INTERNAL_DISPATCH_COMMAND_NOTIFY(dispatcher:IEventDispatcher):void
		{
			_DISPATCH(dispatcher, $INTERNAL_TYPE_COMMAND_NOTIFY);
		}
		
		
		static public const TYPE_MODULES_LOAD_COMPLETE:String = _PREFIX + "modules_load_complete";
		static public function DISPATCH_MODULES_LOAD_COMPLETE(dispatcher:IEventDispatcher):void
		{
			_DISPATCH(dispatcher, TYPE_MODULES_LOAD_COMPLETE);
		}
		
		static public const TYPE_MODULE_INITIALIZED:String = _PREFIX + "module_initialized";
		static public function DISPATCH_MODULE_INITIALIZED(dispatcher:IEventDispatcher):void
		{
			_DISPATCH(dispatcher, TYPE_MODULE_INITIALIZED);
		}
		
	}
}